export default {


    /**
     * xx小时xx分钟  毫秒值-字符串（例如：01:20）转换
     * @param HourAndMinuteTimestamp
     */

    timestampConvertToHourAndMinute(ms) {
        let ss = 1000;
        let mi = ss * 60;
        let hh = mi * 60;

        let hour = Math.floor(ms / hh);
        let minute = Math.floor((ms - (hh * hour)) / mi);
        return `${hour}:${minute}`
    },
    hourAndMinuteMomentConvertToTimestamp(hourAndMinute) {
        let ss = 1000;
        let mi = ss * 60;
        let hh = mi * 60;
        let split = hourAndMinute.split(":");
        let hour = split[0];
        let minute = split[1];

        let timestamp = hour * hh + minute * mi;
        return timestamp;

    }


}
// window.aa = function
//     timestampConvertToHourAndMinute(ms) {
//     let ss = 1000;
//     let mi = ss * 60;
//     let hh = mi * 60;
//
//     let hour = Math.floor(ms / hh);
//     let minute = Math.floor((ms - (hh * hour)) / mi);
//     return `${hour}:${minute}`
// }
